x86: fix XCR0 handling
authorJan Beulich <jbeulich@suse.com>
Tue, 4 Jun 2013 15:25:41 +0000 (17:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 4 Jun 2013 15:25:41 +0000 (17:25 +0200)
commit10b2b21a241795394637167bd4b076f2de17741f
tree1c69c4e55a295502a3c6c92e5dd359862a95865c
parent10f969150025498fe27d985f9021a68f8c7acc31
x86: fix XCR0 handling

- both VMX and SVM ignored the ECX input to XSETBV
- both SVM and VMX used the full 64-bit RAX when calculating the input
  mask to XSETBV
- faults on XSETBV did not get recovered from

Also consolidate the handling for PV and HVM into a single function,
and make the per-CPU variable "xcr0" static to xstate.c.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/arch/x86/domain.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/i387.c
xen/arch/x86/traps.c
xen/arch/x86/xstate.c
xen/include/asm-x86/hvm/support.h
xen/include/asm-x86/xstate.h